package com.example.myapp.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.example.myapp.ADO.ActivityManager;
import com.example.myapp.R;

public class Notice extends AppCompatActivity {



    public void onBackPressed() {
        //此处写退向后台的处理
        finish();
    }//手机返回键

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ActivityManager.getInstance().addActivity(this);
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE );
        setContentView(R.layout.activity_notice);
        TextView notice_title= findViewById(R.id.notice_title);
        ImageView notice_back = findViewById(R.id.notice_back);
        Intent intent =getIntent();
        String  title =intent.getStringExtra("title");
        String  path  =intent.getStringExtra("path");
        WebView webView=findViewById(R.id.webview);
        notice_title.setText(title);
        webView.loadUrl(path);

        notice_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                startActivity(new Intent(Notice.this, Main.class));
                finish();

            }
        });    // 返回
    }
}
